<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作为一个函数调用</title>
</head>

<body>
    <p>
        全局函数 (myFunction) 返回参数参数相乘的结果：
    </p>
    <p id="demo"></p>
    <script>
        function myFunction(a, b) {
            return a * b;
        }
        document.getElementById("demo").innerHTML = myFunction(10, 2); 
    </script>
</body>

</html>